import 'package:flutter/material.dart';

class SubscriptionPlanButton extends StatelessWidget {
  final String duration;
  final String price;
  final VoidCallback onTap;
  final bool isCheck;

  const SubscriptionPlanButton({
    super.key,
    required this.duration,
    required this.price,
    required this.onTap, required this.isCheck,
  });

  @override
  Widget build(BuildContext context) {
    return OutlinedButton(
      onPressed: onTap,
      style: OutlinedButton.styleFrom(
        side: const BorderSide(color: Colors.blue),
        backgroundColor: isCheck?Colors.blue.withOpacity(0.25):null,
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(12),
        ),
        padding: const EdgeInsets.symmetric(
          horizontal: 20,
          vertical: 16,
        ),
      ),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          Text(
            duration,
            style: const TextStyle(
              color: Colors.black87,
              fontSize: 16,
            ),
          ),
          Text(
            price,
            style: const TextStyle(
              color: Colors.black87,
              fontSize: 16,
              fontWeight: FontWeight.bold,
            ),
          ),
        ],
      ),
    );
  }
}